class Solution {
public:
    void hanota(vector<int>& A, vector<int>& B, vector<int>& C) {
        while(A.size())
        {
            B.push_back(A.back());
            A.pop_back();
        }
        while(B.size())
        {
            C.push_back(B.back());
            B.pop_back();
        }
    }
};
